package com.gitee.feizns.web.utils;

/**
 * RasKeyPair pair = generatorKeyPair(1024);
 * String secretText = encrypt("abc", pair.toPublicKey());
 * System.out.println(secretText);  //drkmfcUbDyv5Szb8qjYeSVZ2vWHcCfQ1ZI1rIQKeieYBXJ4VnrSTaCiGwcdIPD7HQZQW84REmADKqlWrvPet1FG26jlotTZApssD1EdLioWDIC+SF39zHpnQEHyS7zIp/dGnI45GfW1e82ouUZfKRsrktzS/J1Rw/2yeHAEGiAE=
 * String original = decrypt(secretText, pair.toPrivateKey());
 * System.out.println(original);    //abc
 *
 * @author feizns
 * @since 2019/6/25
 */
public class RsaUtils extends SecurityUtils {

    private static final String METHOD = "RSA";

    private RsaUtils() {
        super(METHOD);
    }

    private static final RsaUtils RSA_UTILS = new RsaUtils();

    public static final RsaUtils getInstance() {
        return RSA_UTILS;
    }

}
